﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FullLabwork>" %>

<%@ Import Namespace="ControlModule.Daos" %>
<%@ Import Namespace="ControlModule.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Прохождение л/р
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm())
       {%>
    <div>
        <%= Html.HiddenFor(m => m.Id) %>
        <h2 align="center">
            <%= Html.Encode(Model.Topic) %>
        </h2>
    </div>
    <div style="padding: 10px;">
        <%= Model.Descr %>
    </div>
    <div style="horiz-align: center; padding-left: 50px;">
        <p class="header">
            <span>Unity Web Player | </span>WebPlayer</p>
        <div class="content1">
            <div id="unityPlayer1">
                <div class="missing">
                    <a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
                        <img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png"
                            width="193" height="63" />
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div style="padding: 50px;">
        <div>
            Таблица ввода перефирийных параметров:
        </div>
        <table>
            <thead>
                <tr>
                    <th>
                        №
                    </th>
                    <% for (int i = 0; i < Model.FullLabParameters.Count; i++)
                       {
                           if (Model.FullLabParameters[i].ExperimentIndex == 0)
                           { %>
                    <th>
                        <%= 
                            Html.Encode(Model.FullLabParameters[i].Name) %>
                    </th>
                    <% 
                        }
                       } %>
                </tr>
            </thead>
            <tbody>
                <% 
                    for (int experIndex = 0; experIndex < Model.CountExperiments; experIndex++)
                    {
                %>
                <tr>
                    <td style="width: 8%">
                        Эксп.
                        <%= experIndex %>
                    </td>
                    <% for (int paramIndex = 0; paramIndex < Model.FullLabParameters.Count; paramIndex++)
                       {
                           if (Model.FullLabParameters[paramIndex].ExperimentIndex == experIndex)
                           { 
                    %>
                    <td>
                        <%= Html.HiddenFor(p => p.FullLabParameters[paramIndex].Id) %>
                        <%= Html.HiddenFor(p => p.FullLabParameters[paramIndex].ExperimentIndex) %>

                        <%= Html.EditorFor(p => p.FullLabParameters[paramIndex].Content) %>
                    </td>
                    <% 
                        }
                       } 
                    %>
                </tr>
                <% } %>
            </tbody>
        </table>
        <div style="padding: 10px">
            Введите вывод к лабораторной работе:
            <br />
            <%= Html.TextAreaFor(m => m.Conclusion)%>
        </div>
    </div>
    <div style="text-align: right">
        <input type="submit" value="Далее" />
    </div>
    <% } %>
</asp:Content>
